package com.njwb.day15.zqzb.ios.io5;

import com.njwb.day15.zqzb.ios.util.Util;

import java.io.*;

public class OutputStreamWriterDemo01 {
    public static void main(String[] args) {
        OutputStream outputStream = null ;
        OutputStreamWriter osw =null ;
        try {
            outputStream = new FileOutputStream(new File("C:\\Users\\Administrator\\Desktop\\osw.txt"),true);
            osw = new OutputStreamWriter(outputStream,"gbk");
            osw.write("今天天气还是很不错的！");
            osw.write("\r\n");
            osw.write("测试");
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            Util.closeResource(osw,outputStream);
        }
    }
}
